import { HttpParams, HttpHeaders } from "@angular/common/http";
import { environment } from "../../../environments/environment";

//CRUD mode
export const CRUD_MODE = {
    CREATE : 'create',
    EDIT: 'edit',
    DELETE: 'delete',
    VIEW: 'view'
}


// content management
export const ContentModuleKeys = {
    how_it_works: "how_it_works",
    user_guide: "user_guide",
    training_module: "training_module",
    user_agreement: "user_agreement",
    agent_resources_instructions: "agent_resources_instructions",
    expression_of_interest: "expression_of_interest",
    contract_of_sale: "contract_of_sale",
    deposit_form: "deposit_form",
    solicitor_contract: "solicitor_contract",
    management_agreement: "management_agreement",
    useful_documents: "useful_documents",
    FQAs: "FQAs",
    TC: "TC",
    index_video_configuration: "index_video_configuration",
  }

//attachment belong to keys
export const ConstantVariable = {
    //user
    BELONG_TO_CATEGORY_USER_ATTACHMENTS : "user_attachments",
    BELONG_TO_CATEGORY_USER_PROTRAIT : "user_portrait",

    //content
    BELONG_TO_CATEGORY_CONTENT_ATTACHMENTS: "content_attachments",

    //property
    BELONG_TO_PROPERTY_MAIN_IAMGE: "property_main_image",
    //property resoureces
    BELONG_TO_PROPERTY_COS_DOCUMENT: "property_cos_document",
    BELONG_TO_PROPERTY_DEPOSIT_FORM_DOCUMENT: "property_deposit_form_document",
    BELONG_TO_PROPERTY_BILL_CHARGES: "property_bill_charges",
    BELONG_TO_PROPERTY_MANAGEMENT_AGREEMENT: "property_management_agreement_document",
    BELONG_TO_PROPERTY_OTHERS: "property_others",

    //property list
    BELONG_TO_CATEGORY_PROPERTY_LIST_LOGO: "property-list-logo",
    BELONG_TO_CATEGORY_PROPERTY_LIST_MULTI_PICTURES: "property-list-multi-pictures",
    BELONG_TO_CATEGORY_PROPERTY_LIST_ATTACHMENTS: "property-list-attachments",

    //sale notification
    BELONG_TO_CATEGORY_SALES_NOTIFICATION_PROPERTY_BANK_CARD_PICTURE : "sales_notification_property_bank_card_picture",



}

//property detail sub menu keys
export const PropertyMenuKeys = {
    //--house detail--  ?mode=view|edit
    HOUSE_DETAIL: 'house_detail',
    //---resource
    CONTRACT_OF_SALE: 'contract_of_sale',
    DEPOSIT_FORM: 'deposit_form',
    SOLICITOR_CONTRACT: 'solicitor_contract',
    BILLS_CHARGES: 'bills_charges',
    MANAGEMENT_AGREEMENT: 'management_agreement',
    OTHERS: 'others'
}


//user roles
export const UserRoles = {
    ADMIN: "admin",
    AGENT: "agent",
    CUSTOMER: "customer"
}


//user status
export const UserStatus = {
    DRAFT: "draft",
    INACTIVE : "inactive",
    ACTIVE : "active",
    PENDING : "pending"
}

//house type
export const PropertyType = {
    SALE: "sale",
    RENT: "rent"
}

//property sale status
export const PropertySaleStatus = {
    FOR_SALE: "for_sale",
    DEPOSIT_TAKEN: "deposit_taken",
    CONTRACT_EXCHANGED: "contract_exchanged",
    SETTLED:"settled"
}





export class AppSettings {

    public static rootCode = 'i8000110';

    public static mode = 'server';  //web mode can run independent, server side will rely on server response

    public static defaultLanguage = 'en';//default language , zh-CHS 

    public static mock_base = 'assets/mock';

    public static server_base = environment.server_base;
    //  'http://40.125.206.53/rest';

    public static httpMockHeader = {
        withCredentials: true,
        params: new HttpParams().set('mock', 'true'),
        headers: new HttpHeaders().set('Content-Type', 'application/json')
    };
    public static httpServerHeader = {
        withCredentials: true,
        params: new HttpParams(),
        headers: new HttpHeaders().set('Content-Type', 'application/json')
    };

}
